<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        // 在js中，形参与实参的个数可以不等  -- 不建议

        function f(n) {
            console.log(n);
        }

        // f(2);

        f(2, 3);   // 不报错  打印2


        function sum(a, b) {
            console.log(a + b);
        }

        sum(1);    // 1 + undefined = NaN

    </script>

</body>

</html>